export const PACKAGE = require('../../package.json');
export const {RESPONSE_HEADERS} = PACKAGE;
export const isToken= v => typeof v === 'string' && v !== '' ;
export const toNumber = (val) => {const n = parseFloat(val);return isNaN(n) ? val : n}
export const setRawBody = (content) => {
    if('string' === typeof content ){
        return sessionStorage.setItem('raw-body',content)
    }
};
export const getRawBody = () => sessionStorage.getItem('raw-body');
export const appVersionToNumber = (str) => {
    const total = str.split('.').reduce((o, n) => o + n);
    return toNumber(total);
}